Have you tried running it on a real device rather than Simulator or SwiftUI Preview?
I had a similar problem, not with trim, but with opacity Any opacity value less than 1.0 hides the view in Simulator and SwiftUI Preview. But it worked fine on real device.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: